package com.guli.order.feign;

import com.guli.common.pojo.vo.CartVo;
import com.guli.common.utils.R;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/*
 * @Author 罗俊
 * @date 2020/11/18 - 3:50 下午
 *
 */
@FeignClient(name="cart-service")
public interface CartFeignClient {

    @Deprecated // 投机的办法，绕过了 cookie
    @GetMapping("/cart/getSelectedItemForPayment/{memberId}")
    @ApiOperation("获取选中的商品，用于下订单")
    public CartVo getSelectedItemForPayment(@PathVariable("memberId")Long memberId);

    @GetMapping("/cart/getCartList")
    @ApiOperation("获取用户购物车")
    public R getCartList();
}
